﻿
Namespace LightSwitchApplication

    Public Class Application

        Private Sub EditableEmailsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub CreateNewAnimal_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(CanUpdateAnimals)
        End Sub

        Private Sub CreateNewPerson_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(CanUpdatePeople)
        End Sub

        Private Sub EditableAnimalsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableBreedsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableColorsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableEntryCategoriesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableLocationsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableLogTypesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableMediaTypesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableMicrochipManufacterersGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableMovementsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableMovementTypesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditablePersonFlagMultisGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditablePersonFlagsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditablePersonsGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableSheltersGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableSpeciesSetGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableVaccinesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub EditableVaccineTypesGrid_CanRun(ByRef result As Boolean)
            ' Set result to the desired field value
            result = Me.User.HasPermission(SecurityAdministration)
        End Sub

        Private Sub AnimalDetail_CanRun(ByRef result As Boolean, AnimalId As Integer)
            ' Set result to the desired field value
            result = Me.User.HasPermission(CanViewAnimals)
        End Sub

        Private Sub MediaDetail_CanRun(ByRef result As Boolean, MediaId As Integer)
            ' Set result to the desired field value
            result = Me.User.HasPermission(CanUpdateMedia)
        End Sub

        Private Sub PersonDetail_CanRun(ByRef result As Boolean, PersonId As Integer)
            ' Set result to the desired field value
            result = Me.User.HasPermission(CanViewPeople)
        End Sub

        Private Sub Application_Initialize()
            Me.Details.ClientTimeout = 999999
        End Sub
    End Class

End Namespace
